package com.duan.pojo.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.duan.anno.PasswordValid;
import com.duan.validatedGroup.CreateUserGroup;
import com.duan.validatedGroup.UpdateUserGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Email;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author db
 * @version 1.0
 * @description SysUserVO
 * @since 2024/6/17
 */
@Data
public class SysUserVO {

    @Min(value = 1,groups = UpdateUserGroup.class)
    private Long id;

    @ApiModelProperty("部门ID")
    private Long deptId;

    @NotBlank(message = "名字不能为空",groups = CreateUserGroup.class)
    @ApiModelProperty("用户名")
    private String userName;

    @NotBlank(message = "昵称不能为null和空字符串")
    @ApiModelProperty("昵称")
    private String nickName;

    @PasswordValid(groups = CreateUserGroup.class)
    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("用户性别（0男，1女")
    private Integer gender;


    @ApiModelProperty("手机号码")
    private String phone;

    @Email(message = "请填写正确的邮箱地址")
    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("头像地址")
    private String avatarName;

    @ApiModelProperty("用户类型（0管理员，1普通用户")
    private Integer userType;

    @ApiModelProperty("状态：1启用、0禁用")
    private Integer status;

    @ApiModelProperty("备注")
    private String remark;

    @NotNull(message = "请输入地址信息")
    @Valid
    private AddressVO addressVO ;
}
